package proxyPattern;

import java.net.MalformedURLException;
import java.rmi.Naming;
import java.rmi.NotBoundException;
import java.rmi.RemoteException;

public class MyRemoteClient {
	public static void main(String[] args) {
		try {
			MyService service = (MyService) Naming.lookup("rmi://127.0.0.1/HelloService");
			System.out.println(service.sayHello());
		} catch (MalformedURLException | RemoteException | NotBoundException e) {
			e.printStackTrace();
		}

	}
}
